let power x n = if n<=0 then invalid_arg "n negatif ou nul"
  else let rec f n= (match n with
      0 -> 1
    |_-> x* f(n-1))
       in f n ;;

let rec application x y = match x with
    []-> 0
   |(e1,e2)::l -> e1*(power y e2)+ (application l y);;

application [(2,2);(2,3);(4,4);] 2;;

let rec add l1 l2 = match (l1,l2) with 
    ([],[])-> []
  | (l1,[])-> l1
  | ([],l2)-> l2
  |((a1,b1)::l1,(a2,b2)::l2)-> if b1=b2 then (a1+a2,b1)::(add l1 l2)
    else (a1,b1)::(a2,b2)::(add l1 l2);;

add [(1,2);(2,6);(7,8);(2,12)][(1,4);(3,6);(1,9)];;

let deriv x = match x with
   []-> x
  |(a1,b1)::l -> (a1*b1,b1-1)::deriv l;;
    Characters 68-73:
    |(a1,b1)::l -> (a1*b1,b1-1)::deriv l;;
